package com.JavaNet.chapter04_INetAddress;

import java.net.*;

public class MyAddress {


    /**
     * 查找本机地址;
     * SecurityManager security = System.getSecurityManager();
     * 老是这个安全检查器;
     */
    public static void main(String[] args) {
        try {
            InetAddress address = InetAddress.getLocalHost();
            System.out.println(address);
        } catch (UnknownHostException ex) {
            System.out.println("Could not find this computer's address.");
        }
    }
}
